define(['jquery', 'bootstrap', 'select2', 'datetimepicker', 'datetimepickerZhCN'], function($, utils){
  return {
    init: function(data) {
      this.initSelect();
      this.initDatetimepicker();
      this.initSubmitForm();
    },

    initSelect: function() {
      $('.brand-select').select2({
        minimumResultsForSearch: Infinity
      });

      $('.package-type').select2({
        minimumResultsForSearch: Infinity
      });

      $('.drive-age').select2({
        minimumResultsForSearch: Infinity
      });

      $('.pay-type').select2({
        minimumResultsForSearch: Infinity
      });

      $('select[name="category"]').select2({
        minimumResultsForSearch: Infinity
      });

      $('select[name="seat"]').select2({
        minimumResultsForSearch: Infinity
      });

      $('select[name="price"]').select2({
        minimumResultsForSearch: Infinity
      });
    },

    initDatetimepicker: function() {
      $('.pickup-date').datetimepicker({
        language: "zh-CN",
        format: "yyyy-mm-dd",
        autoclose: true,
        todayBtn: true,
        minView: "month", 
      });
      
      $('.return-date').datetimepicker({
        language: "zh-CN",
        format: "yyyy-mm-dd",
        autoclose: true,
        todayBtn: true,
        minView: "month", 
      });
    },

    initSubmitForm: function() {
      
    }
  }
})